<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="http://hongweizhiyuan.oss-cn-hangzhou.aliyuncs.com/layui/css/layui.css"/>
</head>
<body>
<form class="layui-form" action="">
    <input type="text" lay-verify="email" class="layui-input" lay-verType="tips" value="">
    <input type="text" lay-verify="email" class="layui-input" lay-verType="alert" value="">
    <input type="text" lay-verify="email" class="layui-input" lay-verType="msg" value="">
    <button lay-submit class="layui-btn">提交</button>
</form>
<script src="http://hongweizhiyuan.oss-cn-hangzhou.aliyuncs.com/layui/layui.js"></script>
<script>
    //一般直接写在一个js文件中
    layui.use(['layer', 'form'], function () {
        var layer = layui.layer
            , form = layui.form;


    });
</script>
</body>
</html>